#!/usr/bin/perl
print "Enter string\n";
while (<>) {
chomp;
  if (/(.*a\b)(.{0,5})/) {
  print "$1$2 \n";
  last;
  } else {
    print "No match |$_|\n";
    }
}
